﻿Imports System.Xml.Serialization
Imports DotNetNuke.UI.WebControls
Imports System.ComponentModel
Imports Aricie.DNN.UI.Attributes
Imports Aricie.Collections
Imports Aricie.DNN.UI.WebControls.EditControls
Imports Aricie.ComponentModel

Namespace Aricie.DNN.Services.Url.FriendlyUrl

    <Serializable()> _
    Public Class FilterPanel

#Region "Private members"

        Private _FriendlyUrlRadix As String
        Private _FriendlyUrlRadixList As IList(Of String)

        Private _FriendlyUrlFilter As String = ""
        Private _RealUrlFilter As String = ""



#End Region



#Region "Public Properties"

        '<Category("")> _
        '<Editor(GetType(SelectorEditControl), GetType(EditControl))> _
        '<SelectorAttribute("Aricie.DNN.Services.Url.FriendlyUrl.FriendlyUrlSelector, Aricie.FriendlierUrlProvider", "", "", False, True, "...", "-1", False, True)> _
        'Public Property FriendlyUrlRadix() As String
        '    Get
        '        Return _FriendlyUrlRadix
        '    End Get
        '    Set(ByVal value As String)
        '        _FriendlyUrlRadix = value
        '    End Set
        'End Property

        <Editor(GetType(CustomTextEditControl), GetType(EditControl))> _
        <LineCount(1), Width(500)> _
        <LabelMode(LabelMode.Left)> _
        Public Property RealUrlFilter() As String
            Get
                Return _RealUrlFilter
            End Get
            Set(ByVal value As String)
                _RealUrlFilter = value
            End Set
        End Property

        <Editor(GetType(CustomTextEditControl), GetType(EditControl))> _
        <LineCount(1), Width(500)> _
        <LabelMode(LabelMode.Left)> _
        Public Property FriendlyUrlFilter() As String
            Get
                Return _FriendlyUrlFilter
            End Get
            Set(ByVal value As String)
                _FriendlyUrlFilter = value
            End Set
        End Property



        'Public ReadOnly Property FriendlyUrlRadixList() As IList(Of String)
        '    Get
        '        Dim radix As New RadixTree(Of Char, String, String)(7)

        '        For Each friendlyUrl As String In FriendlierUrlContext.Instance.RealFromRewritten.Keys

        '            radix.Set(friendlyUrl, friendlyUrl)

        '        Next

        '        _FriendlyUrlRadixList = radix.AsList()

        '        Return _FriendlyUrlRadixList
        '    End Get
        'End Property

#End Region

    End Class

End Namespace